// Copyright 2012 Dorival de Moraes Pedroso. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build ignore

package main

import (
    "fmt"
    "code.google.com/p/gemlab"
)

func main() {
    rg := gemlab.Sregions{
        []int{-1},      // region tags
        []int{ 5},      // Nx
        []int{ 4},      // Ny
        []int{ 1},      // Nz
        []float64{ 0},  // Ax
        []float64{ 0},  // Ay
        []float64{ 0},  // Az
        []int{0},       // NlX
        []int{0},       // NlY
        []int{0},       // NlZ
        [][]float64{    // points
            { 0.0, 0.0}, // x,y-values
            {15.0, 0.0},
            {15.0, 8.0},
            { 0.0, 8.0},
        },
        [][]int{ // regions connectivity
            {0, 1, 2, 3},
        },
        [][]int{ // boundary tags
            {-10, -11, -12, -13},
        },
    }
    le := gemlab.Lregions{
        []int{-4}, // rtags
        []int{-5}, // jtags
        []int{ 0}, // quads
        [][]float64{     // points
            { 2.0, 8.0}, // x,y-values
            {10.0, 0.0},
        },
        [][]int{ // connectivity
            {0, 1},
        },
        [][]int{ // boundary tags
            {-6, -66}, // left, right
        },
    }
    quad := false
    err  := gemlab.SmeshGen("t_smesh01", quad, &rg, &le)
    if err != nil {
        fmt.Printf("%v\n", err.Error())
    }
}
